﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class admins_tin : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        grid_san_pham.PageIndexChanging += new GridViewPageEventHandler(grid_san_pham_PageIndexChanging);
        if (!IsPostBack)
        {

            layTour();
        }
    }

    void grid_san_pham_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        grid_san_pham.PageIndex = e.NewPageIndex;
        layTour();
    }
    void layTour()
    {
        Tour Tour = new Tour();
        List<ObjTour> lst = new List<ObjTour>();
        lst = Tour.getTourByLoaiTourId("1", Constants.ALL);
        if (lst.Count > 0)
        {
            grid_san_pham.DataSource = lst;
            grid_san_pham.DataBind();
        }
    }
}